package com.hzy.service.impl;

import com.hzy.dao.StorageRecordMapper;
import com.hzy.pojo.StorageRecord;
import com.hzy.service.StorageRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @Package: com.hzy.service.impl
 * @ClassName: StorageRecordServiceImpl
 * @Author: 862982795
 * @CreateTime: 2021/07/13 10:48
 * @Description:入库记录业务接口实现
 */
@Transactional
@Service("storageRecordService")
public class StorageRecordServiceImpl implements StorageRecordService {
    @Autowired//@Resource
    private StorageRecordMapper storageRecordMapper;

    @Override
    public Integer addStorageRecord(StorageRecord storageRecord) {
        return storageRecordMapper.addStorageRecord(storageRecord);
    }

    @Override
    public Integer deleteStorageRecord(Integer id) {
        return storageRecordMapper.deleteStorageRecord(id);
    }

    @Override
    public Integer updateStorageRecord(StorageRecord storageRecord) {
        return storageRecordMapper.updateStorageRecord(storageRecord);
    }

    public StorageRecordMapper getStorageRecordMapper() {
        return storageRecordMapper;
    }

    public void setStorageRecordMapper(StorageRecordMapper storageRecordMapper) {
        this.storageRecordMapper = storageRecordMapper;
    }
}
